//
//  BaseViewController.m
//  ArtCircle
//
//  Created by sunbin on 2017/5/18.
//  Copyright © 2017年 Quanli. All rights reserved.
//

#import "BaseViewController.h"
#import "UIViewController+WXSTransition.h"

@interface BaseViewController ()<AccountBackgroundDelegate>

@end

@implementation BaseViewController

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    
    [self.navigationController.view hideHUD];

    [self.view endEditing:YES];

}

-(AccountBackground *)contentView {
    if (!_contentView) {
        _contentView = [[AccountBackground alloc] init];
        _contentView.delegate = self;
        _contentView.accountHeaderView.titleLab.text = @"手机号快速登录";
        
    }
    return _contentView;
    
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.view endEditing:YES];

    self.view  = self.contentView;

    
    self.view.backgroundColor = [UIColor whiteColor];
    if( ([[[UIDevice currentDevice] systemVersion] doubleValue]>=7.0)) {
        self.edgesForExtendedLayout = UIRectEdgeNone;
        self.extendedLayoutIncludesOpaqueBars = NO;
        self.modalPresentationCapturesStatusBarAppearance = NO;
    }

    
    
}



- (void)presentViewController:(NSString *)className
                animationType:(WXSTransitionAnimationType)animationType
           isSysBackAnimation:(BOOL)isSysBackAnimation {

    Class class = NSClassFromString(className);
    
    [self.navigationController pushViewController:[[class alloc] init] animated:NO];

#if 0
    模态跳转
    [self wxs_presentViewController:[[class alloc] init] makeTransition:^(WXSTransitionProperty *transition) {
        transition.animationType = animationType;
        transition.isSysBackAnimation = isSysBackAnimation;
    } completion:nil];
 
#endif
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}


@end
